﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Classes {
    import Engine.Classes.*;
    import flash.display.*;
    import flash.geom.*;
    import __AS3__.vec.*;

    public class GameCollisionMap extends CollisionMap {

		/**
		 *	把传入矩形的区域内的CollisionCell设为可通过状态
		 */
        public function setOwnedArea(_arg1:Vector.<Rectangle>):void{
            var _local2:Rectangle;
            var _local3:int;
            var _local4:int;
            var _local5:int;
            var _local6:int;
            var _local7:int;
            var _local8:int;
            for each (_local2 in _arg1) {
                _local3 = _local2.x;
                _local4 = _local2.y;
                _local5 = (_local2.x + _local2.width);
                _local6 = (_local2.y + _local2.height);
                _local7 = _local3;
                while (_local7 < _local5) {
                    _local8 = _local4;
                    while (_local8 < _local6) {
                        m_cells[_local7][_local8].isPathable = true;
                        _local8++;
                    };
                    _local7++;
                };
            };
        }
        public function get boundingRectangle():Rectangle{
            return (new Rectangle(m_xStart, m_yStart, (m_xEnd - m_xStart), (m_yEnd - m_yStart)));
        }

    }
}//package Classes 
